const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  // 简单写法
  // devServer: {
  //   proxy: 'http://localhost:5000'
  // }
  // 完整写法
  devServer: {
    proxy: {
      '/student-api': {
        target: 'http://localhost:5000',
        pathRewrite: {
          '^/student-api': ""
        }
        // ws: true,
        // changeOrigin: true
      },
      '/car-api': {
        target: 'http://localhost:5001',
        pathRewrite: {
          '^/car-api': ""
        }
      }
    }
  }
})
